﻿using Prism.Mvvm;
using Prism.Services.Dialogs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OpticalWheelPlasticFilmTest.ViewModels.Dialogs
{
    public class AboutDialogViewModel : BindableBase, IDialogAware
    {
        public string Title { get; set; } = "关于";
        private string version;
        public string Version
        {
            get { return version; }
            set { SetProperty(ref version, value); }
        }
        private string name;
        public string Name
        {
            get { return name; }
            set { SetProperty(ref name, value); }
        }
        public event Action<IDialogResult> RequestClose;

        public bool CanCloseDialog()
        {
            return true;
        }

        public void OnDialogClosed()
        {

        }

        public void OnDialogOpened(IDialogParameters param)
        {
            Name = param.GetValue<string>("Title");
            Version = param.GetValue<string>("Version");
        }
    }
}
